﻿@model OnlineBookstore.Models.shopInfo
@{
    Layout = null;
}

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>个人信息 - 网上书城</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
    <style>
        :root {
            --primary-color: #6c5ce7;
            --primary-dark: #5649c0;
            --text-color: #333;
            --border-color: #ddd;
            --light-bg: #f8f9fa;
            --radius: 6px;
            --shadow: 0 2px 10px rgba(0,0,0,0.1);
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        body {
            font-family: 'Noto Sans SC', sans-serif;
            color: var(--text-color);
            background-color: #f5f7fa;
            line-height: 1.6;
        }

        /* 布局容器 */
        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 15px;
        }

        /* 页眉样式 */
        .header {
            background-color: white;
            box-shadow: var(--shadow);
            padding: 15px 0;
        }

        .header-content {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .logo {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--primary-color);
            text-decoration: none;
        }

        .logout-link {
            color: #e74c3c;
            text-decoration: none;
            transition: all 0.3s ease;
        }

        .logout-link:hover {
            color: #c0392b;
            text-decoration: underline;
        }

        /* 主要内容区 */
        .main-content {
            padding: 30px 0;
        }

        .profile-container {
            background: white;
            border-radius: var(--radius);
            box-shadow: var(--shadow);
            padding: 30px;
            max-width: 800px;
            margin: 0 auto;
        }

        .page-title {
            font-size: 1.5rem;
            color: var(--primary-color);
            margin-bottom: 1.5rem;
            padding-bottom: 0.5rem;
            border-bottom: 2px solid var(--primary-color);
        }

        /* 个人信息列表 */
        .profile-list {
            list-style: none;
            margin: 0;
            padding: 0;
        }

        .profile-item {
            display: flex;
            margin-bottom: 1.2rem;
            align-items: center;
            padding: 0.8rem 0;
            border-bottom: 1px solid var(--light-bg);
        }

        .profile-label {
            font-weight: 600;
            min-width: 100px;
            color: #555;
        }

        .profile-value {
            flex: 1;
            color: var(--text-color);
        }

        .balance {
            font-size: 1.3rem;
            color: var(--primary-color);
            font-weight: 700;
        }

        /* 操作按钮 */
        .action-buttons {
            display: flex;
            gap: 15px;
            margin-top: 30px;
        }

        .btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 10px 20px;
            border-radius: var(--radius);
            font-size: 1rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
            text-decoration: none;
        }

        .btn-primary {
            background-color: var(--primary-color);
            color: white;
            border: none;
        }

        .btn-primary:hover {
            background-color: var(--primary-dark);
            transform: translateY(-2px);
        }

        .btn-outline {
            background-color: transparent;
            color: var(--primary-color);
            border: 1px solid var(--primary-color);
        }

        .btn-outline:hover {
            background-color: rgba(108, 92, 231, 0.1);
        }

        .btn i {
            margin-right: 8px;
        }

        /* 页脚样式 */
        .footer {
            text-align: center;
            padding: 20px 0;
            margin-top: 40px;
            border-top: 1px solid var(--border-color);
            color: #666;
            font-size: 0.9rem;
        }

        /* 响应式调整 */

    </style>
</head>
<body>
    <!-- 页眉 -->
    <header class="header">
        <div class="container header-content">
            <a href="/" class="logo">
                <i class="fas fa-book"></i> 广软智慧书城
            </a>
            <div id="loginmsg">
                @Html.ActionLink("注销账户", "Cancellation", new { id = Session["Id"] }, new { @class = "logout-link" })
            </div>
        </div>
    </header>

    <!-- 主要内容区 -->
    <main class="main-content">
        <div class="container">
            <div class="profile-container">
                <h1 class="page-title">
                    <i class="fas fa-user-circle"></i> 个人信息
                </h1>

                <ul class="profile-list">
                    <li class="profile-item">
                        <span class="profile-label">
                            <i class="fas fa-user"></i> 账号：
                        </span>
                        <span class="profile-value">@Model.ShopLogin</span>
                    </li>

                    <li class="profile-item">
                        <span class="profile-label">
                            <i class="fas fa-id-card"></i> 姓名：
                        </span>
                        <span class="profile-value">@Model.ShopName</span>
                    </li>

                    <li class="profile-item">
                        <span class="profile-label">
                            <i class="fas fa-map-marker-alt"></i> 居住地：
                        </span>
                        <span class="profile-value">@Model.ShopRegio</span>
                    </li>

                    <li class="profile-item">
                        <span class="profile-label">
                            <i class="fas fa-lock"></i> 密码：
                        </span>
                        <span class="profile-value">@Model.ShopPassword</span>
                    </li>

                    <li class="profile-item">
                        <span class="profile-label">
                            <i class="fas fa-wallet"></i> 账号余额：
                        </span>
                        <span class="profile-value balance yu"></span>
                    </li>
                </ul>

                <div class="action-buttons">
                    <a href="@Url.Action("GetCapitalAdvanceOrdeR", new { id = Session["Id"] })" class="btn btn-primary">
                        <i class="fas fa-file-invoice-dollar"></i> 查看账单
                    </a>
                    @if (Session["Id"] != null)
                    {
                        <a href="@Url.Action("AddCapitalAdvance", new { id = Session["Id"] })" class="btn btn-outline">
                            <i class="fas fa-coins"></i> 账户充值
                        </a>
                    }
                    else
                    {
                        <span class="text-danger">请先登录或获取ID</span>
                    }
                    <a href="@Url.Action("Index")" class="btn btn-outline">
                        <i class="fas fa-arrow-left"></i> 返回首页
                    </a>
                </div>
            </div>
        </div>
    </main>

    <!-- 页脚 -->
    <footer class="footer">
        <div class="container">
            <p>广软智慧书城 — MVC 项目 © @DateTime.Now.Year</p>
        </div>
    </footer>

    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
    <script>
        $(document).ready(function() {
            // 设置余额
            var balance = @Session["x"];
            $('.yu').text(balance + ' 元');

            // 格式化余额显示
            if (balance !== undefined && balance !== null) {
                $('.yu').text('¥' + parseFloat(balance).toFixed(2));
            }
        });
    </script>
</body>
</html>